home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Belgian Amiga Club - ADF Collection
/
BS1 part 60.zip
/
BS1 part 60
/
Imagemaster d5.adf
/
piarc.lzh.parta
/
imopal.rexx
< prev
next >
Wrap
OS/2 REXX Batch file
|
1993-04-14
|
3KB
|
128 lines
/*
* imopal.rexx
*
* Written by: Black Belt Systems Technical Development
* Last Update: March 15th, 1993
* Revision: 1.00
* For: Black Belt Systems image processing series IM, IM F/c, and IP.
*
* Modifications:
* 1.00 15 Mar 1992 Initial release.
*
*/
def_pal = 0; /* 0 = NTSC, 1 = PAL !!! CHANGE THIS FOR PAL */
/*
* Default display modes - These are used when this is called with
* selective redraw parameters
*/
def_hires = 1; /* 0 = lo 1 = hi-res */
def_lace = 1; /* 0 = non-lace, 1 = lace */
def_overscan = 0; /* 0 = normal, 1 = overscan */
def_scaled = 1; /* 0 = EXACT, 1 = SCALED */
parse arg jackin dx1 dy1 dx2 dy2
call pragma('stack',20000);
if jackin = 'finish' then do
exit 0;
end;
/* We turn selective redraw OFF for now */
dx1 = 0;
dx2 = 0;
dy1 = 0;
dy2 = 0;
/*
* open rexxsupport.library -- needed for some functions
*/
if ~show('L',"rexxsupport.library") then do
if addlib('rexxsupport.library',0,-30,0) then do
/* everything's ok */
end;
else do
say 'We Have A Library Problem, Unable To Load "rexxsupport.library"';
say 'Cannot operate script without this library - sorry!';
exit 10;
end;
end;
/*
* This will automatically direct the script to the proper
* software, if it is running.
*/
prtnme = 'IM_Port'; /* assume Image Professional */
/*
* This code attempts to read a file called "picmdpath" from REXX:
* If it can't find it, the script will assume that the commands
* associated with this PI Module are in "c:". If the file exists,
* the script will look in the path that is specified in the file.
* If you create this file, you MUST put a complete, correct path
* in it; if the commands are in a sub-directory, you have to put
* the trailing slash on the path (like, device:dir/).
*
*/
cmdpath = 'c:';
if open(fhandle,'rexx:picmdpath','read') then /* open the file */
do
cmdpath = readln(fhandle);
call close(fhandle); /* close the file */
end
address(prtnme);
if jackin > 0 then do
hires = def_hires;
lace = def_lace;
overscan = def_overscan;
pal = def_pal;
scaled = def_scaled;
end;
else do
pal = def_pal;
options results;
'askyn "Lo-Res","Hi-Res"';
hires = result;
options;
options results;
'askyn "Non-Lace","InterLace"';
lace = result;
options;
options results;
'askyn "Display Non- Overscan","Display Overscan"';
overscan = result;
options;
options results;
'askyn "Pixel Exact","Scaled"';
scaled = result;
options;
options results;
'jackin';
jackin = result;
options;
end;
/* USAGE for the IMopal program is */
/* IMopal <jackin> [hires] [lace] [overscan] [pal] [scale] [dx1] [dy1] [dx2] [dy2] */
/* Default is */
/* IMopal - 1 1 0 */
address command cmdpath||'imopal '||jackin||' '||hires||' '||lace||' '||overscan||' '||pal||' '||scaled||' '||dx1||' '||dy1||' '||dx2||' '||dy2;
address(prtnme);
'tofront';
'finish';
address;
exit 0;